package ch.zhaw.swp1.view.component;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;

import ch.zhaw.swp1.model.message.address.Address;

/**
 * Badge to show a user entered address in GUI 
 * @author Daniel Tiefenauer
 */
public class AddressBadge extends Badge {

	/**
	 * Default version
	 */
	private static final long serialVersionUID = 1L;
	private Address address = null;
	private JLabel addressLabel = new JLabel();
	private JButton deleteButton = new JButton(new ImageIcon("images/icon_close.jpg"));
	
	/**
	 * Default constructor
	 * @param address the address to be displayed
	 */
	public AddressBadge(Address address){
		this.address = address;
		init();
	}

	/**
	 * Initialize Badge
	 */
	private void init() {
		addressLabel.setText(address.getAddress());
		deleteButton.setSize(20, 20);
	}
	
	

}
